// pages/home/home.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        seachName: "",
        current: 0,
        bannerImages: [
            "/pages/home/img/a.jpeg",
            "/pages/home/img/b.jpeg",
            "/pages/home/img/c.jpeg",
            "/pages/home/img/d.jpeg",
            "/pages/home/img/e.jpeg",
            "/pages/home/img/f.jpeg",
            "/pages/home/img/g.jpeg",
        ],
        listItem: [{
                image: '/pages/home/img/item1.png',
                text: "每日上新"
            }, {
                image: '/pages/home/img/item2.png',
                text: "热销排行"
            },
            {
                image: '/pages/home/img/item3.png',
                text: "小米自营"
            },
            {
                image: '/pages/home/img/item4.png',
                text: "下单立返"
            },
            {
                image: '/pages/home/img/item5.png',
                text: "9.9包邮"
            },
            {
                image: '/pages/home/img/item6.png',
                text: "有品直播"
            },
            {
                image: '/pages/home/img/item7.png',
                text: "小米庄园"
            },
            {
                image: '/pages/home/img/item8.png',
                text: "有品直播"
            },
            {
                image: '/pages/home/img/item9.png',
                text: "小米庄园"
            },
            {
                image: '/pages/home/img/item10.png',
                text: "智能生活"
            }
        ]
    },
    bindchange(event) {
        this.setData({
            current: event.detail.current
        })
    },
    inputSearch(event) {
        console.log(event);
        this.setData({
            seachName: event.detail
        })
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function() {
        wx.showTabBar({
            animation: true
        })
    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function() {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function() {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function() {

    }

})